package cn.mxb.logic.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.mxb.floor.pagination.Result;
import cn.mxb.logic.dao.SysTownDAO;
import cn.mxb.logic.entity.SysTown;
import cn.mxb.logic.service.ISysTownService;

@Service("sysTownService")
public class SysTownServiceImpl  implements ISysTownService {

	@Autowired
	private SysTownDAO SysTownDAO;
	
	
	@Override
	public SysTown findByProperty(String property, String value) {
		return SysTownDAO.findByProperty(property, value);
	}

	/**
	 * 分页
	 */
	@Override
	public Result<SysTown> find(SysTown sysTown, int page, int row) {
		return SysTownDAO.find(sysTown, page, row);
	}

	/**
	 * add
	 */
	@Override
	public SysTown add(SysTown SysTown) {
		return SysTownDAO.save(SysTown);
	}


	@Override
	public void delete(int id) {
		SysTownDAO.remove(SysTown.class,id);
	}


	@Override
	public void update(SysTown SysTown) {
		
	}


	@Override
	public List<SysTown> findListByProperty(String property, String value) {
		return SysTownDAO.findListByProperty(property, value);
	}

	@Override
	public List<SysTown> findAllList() {
		return SysTownDAO.getAll(SysTown.class);
	}


	
}
